package pilegen;

public class Poignee {

	public Variable pointeVers;
	public String nom;
	public Class typepgn;
	public int caseMemoire;
	
	public Poignee(String nom, int caseMemoire){
		this.pointeVers = null;
		this.nom = nom;
		this.caseMemoire = caseMemoire;
		
	}
	
	public Poignee(Variable pointevers, String nom, int caseMemoire){
		this.pointeVers = pointevers;
		this.nom = nom;
		this.typepgn = pointevers.type;
		this.caseMemoire = caseMemoire;
	}
	
	public Poignee clonePoignee(){
		Poignee res;
		if(this.pointeVers !=null){
			res = new Poignee(this.pointeVers.cloneVariable(), this.nom, this.caseMemoire);
		}else{
			res = new Poignee(this.nom, this.caseMemoire); 
		}
		return res;
	}
	
}
